package com.wtwd.device;

import com.wtwd.device.handler.MsgHandlerFactory;
import com.wtwd.device.properties.MqProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableEurekaClient
public class AppMsgServiceApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(AppMsgServiceApplication.class, args);
        MqProperties mqProperties = applicationContext.getBean(MqProperties.class);
        //初始化 handeler
        MsgHandlerFactory.initMqService(mqProperties);
    }

}
